package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "news_k16serversn")
public class NewsK16serverSn implements Serializable {
	    private static final long serialVersionUID = 1L;
	    @Id
	    @Basic(optional = false)
	    @Column(name = "sn")
	    private String sn;
	    @JoinColumn(name = "serverid", referencedColumnName = "id")   
		@ManyToOne
	    private NewsK16server k16server;
	    
	    public NewsK16serverSn(){
	    	
	    }
	    public NewsK16serverSn(String sn){
	    	this.sn=sn;
	    }
	    
		public String getSn() {
			return sn;
		}
		public void setSn(String sn) {
			this.sn = sn;
		}
		public NewsK16server getK16server() {
			return k16server;
		}
		public void setK16server(NewsK16server k16server) {
			this.k16server = k16server;
		}
		
		@Override
	    public int hashCode() {
	        int hash = 0;
	        hash += (sn != null ? sn.hashCode() : 0);
	        return hash;
	    }

	    @Override
	    public boolean equals(Object object) {
	        if (!(object instanceof NewsK16serverSn)) {
	            return false;
	        }
	        NewsK16serverSn other = (NewsK16serverSn) object;
	        if ((this.sn == null && other.sn != null) || (this.sn != null && !this.sn.equals(other.sn))) {
	            return false;
	        }
	        return true;
	    }

	    @Override
	    public String toString() {
	        return "com.dp.vo.NewsK16serverSn[sn=" + sn + "]";
	    }
}
